package edu.sctu.practice.class01.zhangwang.day2015_10_08.text12;

/**
 * Created by Z_W on 2015/10/9.
 */
public class Vehicle {
    public int tirNum;
    public String color;
    public int weight;
    public int speed;

    public Vehicle(int tirNum, String color, int weight) {
        this.tirNum = tirNum;
        this.color = color;
        this.weight = weight;
    }

    public void display() {
        System.out.println("汽车轮胎个数为：" + tirNum + ",汽车颜色为：" + color + "，汽车重：" + weight+"，现在速度为："+speed);
    }

    public void speedUp() {
        this.speed += 5;
    }

    public void speedDoen() {
        this.speed -= 10;
    }

    public void stop() {
        this.speed = 0;
        System.out.println("汽车停止！");
    }
}
